package com.xuelang.pipeline.infrastructure.resource.converter;

import com.xuelang.pipeline.domain.resource.Cluster;
import com.xuelang.pipeline.infrastructure.resource.dataobject.ClusterDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 集群实体与集群DO转换器类
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface ClusterToClusterDOConverter {

    ClusterToClusterDOConverter INSTANCE = Mappers.getMapper(ClusterToClusterDOConverter.class);

    /**
     * Cluster转化为ClusterDO
     * @param cluster
     * @return
     */
    ClusterDO clusterToClusterDO(Cluster cluster);

    /**
     * ClusterDO转化为Cluster
     * @param clusterDO
     * @return
     */
    Cluster clusterDOToCluster(ClusterDO clusterDO);

}
